﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CommonLibrary;

namespace Finance
{
    public partial class MainHeader : UserControl
    {
        public event DoSampleEvent OnShowHelp = null;
        public event DoSampleEvent OnBackToMainView = null;

        public MainHeader()
        {
            InitializeComponent();
        }

        private void btnShowHelp_Click(object sender, EventArgs e)
        {
            if (OnShowHelp == null)
            {
                MessageBox.Show("帮助文档不存在...", "提示", 
                    MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                OnShowHelp();
            }
        }

        private void btnBackToMain_Click(object sender, EventArgs e)
        {
            if (OnBackToMainView != null)
            {
                OnBackToMainView();
            }
        }
    }
}
